package com.ws.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ws.entity.GoodsType;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface GoodsTypeMapper extends BaseMapper<GoodsType> {
    
    @Select("<script>" +
            "select  " +
            "id, " +
            "`name`, " +
            "remark " +
            "from shop_goods_type " +
            "where "+
            "<if test=' `name` != \"\"'>" +
            "`name` like '%${name}%'" +
            "</if>" +
            "</script>")
    Page<GoodsType> getGoodsTypeForPage(Page<GoodsType> p, @Param("name") String name);
}
